package com.mini.cn.goods.servlet.ws.service;


import com.mini.cn.goods.io.netty.ws.WebSocketSession;
import com.mini.cn.goods.io.netty.ws.info.FastPushMsg;

/**
 * Created with IntelliJ IDEA.
 * User: fly
 * Date: 2020-02-22
 * Time: 4:49 下午
 */
public interface IPushResultCallback {

    /**
     * 成功
     *
     * @param session 推送对应的socket
     * @param record  推送内容
     */
    void onSuccessSend(WebSocketSession session, FastPushMsg record);

    /**
     * 失败
     *
     * @param session   推送对应的socket
     * @param record    推送内容
     * @param throwable 失败的异常
     */
    void onFailSend(WebSocketSession session, FastPushMsg record, Throwable throwable);

}
